import request from '@/util/request'

/**
 * projectItemAdd 添加项目管理
 * @param id
 */
export const projectItemAdd = (data: any) => {
  return request({
    url: '/projectItem',
    method: 'POST',
    data: data
  })
}


/**
 * projectItemRemove 通过ID删除项目管理
 * @param id
 */
export const projectItemRemove = (id: number) => {
  return request({
    url: '/projectItem',
    method: 'DELETE',
    params: {
      id: id
    }
  })
}

/**
 * projectItemModify 修改项目管理
 * @param data ProjectItem修改内容
 */
export const projectItemModify = (data: any) => {
  return request({
    url: '/projectItem',
    method: 'PUT',
    data: data
  })
}


/**
 * projectItemFind 查询项目管理列表 
 * @param data 查询参数 
 * @param pageSize 分页大小
 * @param pageNum 当前页
 */
export const projectItemFind = (data: any, pageSize: number,pageNum:number) => {
  return request({
    url: '/projectItem/list',
    method: 'GET',
    params: {
      pageNum: pageNum,
      pageSize: pageSize, 
      ...data 
    }
  })
}


/**
 * projectItemFindById 查找项目管理byId
 * @param id
 */
export const projectItemFindById = (id: number) => {
  return request({
    url: '/projectItem',
    method: 'GET',
    params: {
      id: id
    }
  })
}
